<%@ Page Language="C#" MasterPageFile="~/GUI/Webpage/Admin/MasterAdmin.master" AutoEventWireup="true" CodeFile="RestaurantManagement.aspx.cs" Inherits="GUI_Webpage_Restaurant" Title="Restaurant Management" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="tdHolder" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <table  border="0" cellpadding="0" cellspacing="0">
                                <tr> 
                                    <td colspan="2">
                                        <img src="../../../GUI/Image/WebsiteTemplate/30-4/Title_RestaurantManagement.jpg" alt="Restaurant" /></td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        <table class="TableOrderContent" cellpadding="5" cellspacing="5">
                                             <tr>
                                            <td class="tdTextContent">
                                                    <table align="center" border="0" cellpadding="2" cellspacing="2">
                                                        <tr>
                                                            <td>
                                                                Restaurant ID:</td>
                                                            <td >
                                                                <asp:TextBox ID="txtResID" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvResID" runat="server" ErrorMessage="Restaurant ID is required" ControlToValidate="txtResID"></asp:RequiredFieldValidator></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Restaurant name:</td>
                                                            <td>
                                                    <asp:TextBox ID="txtResName" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvResName" runat="server" ErrorMessage="Restaurant name is required" ControlToValidate="txtResName"></asp:RequiredFieldValidator></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Phone:</td>
                                                            <td >
                                                                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Address:</td>
                                                            <td>
                                                                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox></td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Picture:</td>
                                                            <td>
                                                                <asp:FileUpload ID="fileRestaurant" runat="server" /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Description:</td>
                                                            <td>
                                                                <asp:TextBox ID="txtDescription" runat="server" CssClass="controlText" TextMode="MultiLine"></asp:TextBox></td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                            </td>
                                                            <td class="tdButton">
                                                                <asp:Button ID="btnCreate" runat="server" class="button" Text="Create" OnClick="btnCreate_Click" /></td>
                                                        </tr>
                                                    </table>
                                              
                                            </td>
                                </tr>
                                <tr>
                                        <td>
                                        <table cellpadding="0" cellspacing="5">
                                            <tr>
                                                <td colspan="3">
                                                <strong>
                                                    <i>
                                                        LIST OF ALL RESTAURANTS
                                                    </i>
                                                </strong>                                                    
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <asp:GridView ID="grvRestaurant" runat="server" CellPadding="5" 
                                                    AutoGenerateColumns="False" DataKeyNames="ResID" 
                                                    OnRowCancelingEdit="grvRestaurant_RowCancelingEdit" 
                                                    OnRowDeleting="grvRestaurant_RowDeleting" 
                                                    OnRowEditing="grvRestaurant_RowEditing" 
                                                    OnRowUpdating="grvRestaurant_RowUpdating">
                                                        <Columns>
                                                            <asp:BoundField DataField="resID" HeaderText="RestaurantID" />
                                                            <asp:BoundField DataField="resName" HeaderText="Restaurant name" />
                                                            <asp:BoundField DataField="phone" HeaderText="Phone" />
                                                            <asp:BoundField DataField="address" HeaderText="Address" />
                                                            <asp:BoundField DataField="resDescription" HeaderText="Description" />
                                                            <asp:CommandField ShowEditButton="True" />
                                                            <asp:CommandField ShowDeleteButton="True" />
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                                </tr>  
                                                                                                                                                                                   
                   </table>
              </td>
               </tr>
                                        </table>
                                    </td>
                                </tr>

                            </table>
                </td>
                </tr>
     </table>
</asp:Content>

